Add diagnostic logging to Delete action in CleanAcrImagesCommand#2057
Add diagnostic logging to Delete action in CleanAcrImagesCommand#2057
Conversation
… cleanup command Fixes #2056: EOL annotation writes keep updating LastUpdatedOn on staging repos, preventing the 15-day age check from ever passing. Using CreatedOn ensures repos are deleted based on when they were originally created. Agent-Logs-Url: https://github.com/dotnet/docker-tools/sessions/0a39b8b7-2866-4759-ab63-7d2d91f58b4a Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
|
@copilot on second thought, this change seems risky right out of the gate. We might end up deleting more repos than we intended. Do this instead: Instead, add logging output underneath the That's it for this PR. Then, we'll be able to analyze the log output and determine if the repo CreatedOn date is the correct decision. |
Reverts the CreatedOn change and instead adds structured logging to the Delete case that includes: created date, last updated date, manifest count, whether the repo is being deleted, and the reason why/why not. This will enable log analysis to determine the correct date field to use. Agent-Logs-Url: https://github.com/dotnet/docker-tools/sessions/9a845109-70e8-4747-a5d2-4f3ded9726e0 Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Reverted the |
Duplicate EOL annotation writes continuously refresh
LastUpdatedOnon staging repos, so theDeleteaction's age check never passes and repos accumulate indefinitely (1,840+ staging repos).To safely evaluate the correct fix, this PR adds structured diagnostic logging to the
Deletecase inCleanAcrImagesCommand.ProcessRepoAsync. The log output includes:CreatedOndateLastUpdatedOndateThis will allow analysis of pipeline log output to determine whether switching from
LastUpdatedOntoCreatedOnis the correct approach before making that behavioral change.Original prompt